<!doctype html>
<html ng-app>
  <head>
    <script src="http://code.angularjs.org/1.0.6/angular.min.js"></script>
    <script src="script.js"></script>
  </head>
  <body>
    <div ng-controller="Ctrl">
      <form name="myForm">
        User name: <input type="text" name="userName" ng-model="user.name" required>
        <span class="error" ng-show="myForm.userName.$error.required">
          Required!</span><br>
        Last name: <input type="text" name="lastName" ng-model="user.last"
          ng-minlength="3" ng-maxlength="10">
        <span class="error" ng-show="myForm.lastName.$error.minlength">
          Too short!</span>
        <span class="error" ng-show="myForm.lastName.$error.maxlength">
          Too long!</span><br>
      </form>
      <hr>
      <tt>user = {{user}}</tt><br/>
      <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>
      <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>
      <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>
      <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>
      <tt>myForm.$valid = {{myForm.$valid}}</tt><br>
      <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
      <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>
      <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>
    </div>

    <table id="TblWishList" class="wishList">
			<thead>
				<tr title="headerRow" class="">
					<th>Scrip Code</th>
					<th>Scrip ID</th>
					<th>LTP</th>
					<th>Chg Value</th>
					<th>Chg %</th>
					<th>Industry</th>
					<th>Group</th>
					<th>Face value</th>
				</tr>
			</thead>
			<tbody ng:controller="TTCtrl">
				<tr ng:repeat="stock in stocks.objectList">
					<td>{{stock.scripCode}}</td>
					<td>{{stock.scripName}}</td>
					<td>{{stock.curValue}}</td>
					<td>{{stock.chgValue}}</td>
					<td>{{stock.chgPer}}</td>
					<td>{{stock.industry}}</td>
					<td>{{stock.bseGroup}}</td>
					<td>{{stock.faceValue}}</td>
				</tr>
			</tbody>
	</table>

  </body>
</html>